package cn.cdeden.system.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @ProjectName : ecm_hou
 * @Package : com.cdyd.ecm.file.enums
 * @ClassName : TreeEnum
 * @Author : Yu.
 * @Description : // TODO
 * @Date : 2022/10/17 14:30
 * @Version : 1.0
 */
@Getter
@AllArgsConstructor
public enum TreeEnum {

    PERSONAL("personal","0"),

    TEAM("team","1"),
    ENTERPRISE("enterprise","2"),
    TEMPORARY("temporary","temporary"),
    CONTRACT("contract","3"),
    CONTRACT_ELATED_DOC("contractRelatedDoc","34"),
    CONTRACT_TEMP("contractTemp","5"),
    SUPPLIER_APTITUDE("supplierAptitude","6"),
    SUPPLIER_DOC("supplierDoc","7"),
    SUPPLIER_EVENT_DOC("supplierEventDoc","8"),
    PATENT_DOC("patentDoc","9"),


    ;

    private final String type;
    private final String num;


    public static TreeEnum find(String type) {
        for (TreeEnum value : TreeEnum.values()) {
            if (StringUtils.equalsIgnoreCase(type,value.getType())) {
                return value;
            }
        }
        return null;
    }
}
